package com.ambulance.project.biz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 车载设备管理表
 * </p>
 *
 * @author zr
 * @since 2020-04-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("biz_carDevice")
@ApiModel(value="CarDevice对象", description="车载设备管理表")
public class CarDevice extends Model<CarDevice> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "设备终端标识")
    @TableId(value = "deviceID", type = IdType.AUTO)
    private Integer deviceID;

    @ApiModelProperty(value = "医院标识")
    @TableField("uid")
    private Integer uid;

    @ApiModelProperty(value = "所属车辆标识")
    @TableField("carID")
    private Integer carID;

    @ApiModelProperty(value = "车牌号")
    @TableField("car_vin")
    private String carVin;

    @ApiModelProperty(value = "厂家品牌")
    @TableField("vender")
    private String vender;

    @ApiModelProperty(value = "设备类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "设备型号")
    @TableField("model")
    private String model;

    @ApiModelProperty(value = "接口类型，0Wi-Fi，1其他")
    @TableField("interface_type")
    private String interfaceType;

    @ApiModelProperty(value = "数据类型，0心电数据包，1其他")
    @TableField("data_type")
    private String dataType;

    @ApiModelProperty(value = "序列号")
    @TableField("serial")
    private String serial;

    @ApiModelProperty(value = "状态，0正常，1停用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "最后传输时间")
    @TableField("last_transfer_time")
    private LocalDateTime lastTransferTime;

    @ApiModelProperty(value = "数据回传时间")
    @TableField("data_receive_time")
    private LocalDateTime dataReceiveTime;


    @Override
    protected Serializable pkVal() {
        return this.deviceID;
    }

}
